class Game < ActiveRecord::Base
  has_one :board
  before_save :update_token
  
private
  def update_token
    self.token = SHA1.new("#{Time.now.to_f}#{id}#{player1}#{player2}dJKSD1785!4").to_s
  end
end
